# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=merkuro
pkgver=24.02.2
pkgrel=0
pkgdesc="A calendar application using Akonadi to sync with external services (NextCloud, GMail, ...)"
# armhf blocked by qt6-qtdeclarative
# ppc64le, s390x, riscv64 and armv7 blocked by qt6-qtwebengine -> akonadi
arch="all !armhf !ppc64le !s390x !riscv64 !armv7"
url="https://invent.kde.org/pim/kalendar"
license="GPL-3.0-or-later AND BSD-2-Clause"
depends="
	kdepim-runtime
	kirigami-addons
	kirigami
	qt6-qtlocation
	"
makedepends="
	akonadi-contacts-dev
	akonadi-dev
	eventviews-dev
	extra-cmake-modules
	kcalendarcore-dev
	kconfigwidgets-dev
	kcontacts-dev
	kcoreaddons-dev
	ki18n-dev
	kidentitymanagement-dev
	kirigami-addons-dev
	kirigami-dev
	kitemmodels-dev
	kpackage-dev
	kpeople-dev
	kwindowsystem-dev
	mailcommon-dev
	mimetreeparser-dev
	qqc2-desktop-style-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtlocation-dev
	qt6-qtsvg-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/pim/merkuro.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/merkuro-$pkgver.tar.xz"
# No tests
options="!check"

provides="kalendar=$pkgver-r$pkgrel"
replaces="kalendar"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
4958ddd9e15637852da04004f661b120315e95c0430dd910e8018c74dda475785b0cf91afc8cfe24199dd134f9de1ce2a048d3531161ea444f1af1f5ed43b88e  merkuro-24.02.2.tar.xz
"
